﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Laharsub.Server.Wcf
{
    public interface IPubSubBackend
    {
        IAsyncResult BeginCreateTopic(AsyncCallback callback, object state);
        int EndCreateTopic(IAsyncResult result);

        IAsyncResult BeginPublishMessage(int topicId, string contentType, Stream body, AsyncCallback callback, object state);
        int EndPublishMessage(IAsyncResult result);

        IAsyncResult BeginSubscribe(IDictionary<int, int> subscriptions, TimeSpan timeout, AsyncCallback callback, object state);
        IEnumerable<PubSubMessage> EndSubscribe(IAsyncResult result);
    }
}
